API Settings Manager
The API Settings Manager allows you to control various different aspects of how many and how often calls are made to the Betfair API. The API Settings Manager is accessed from the right click options on the header of the Main Info Bar.
The calls that are made have been broken down into 5 different categories:
Bets - the information relating to your bets for a market, both matched and unmatched
Prices - the information relating to the amounts waiting to back and lay. This varies depending on the setting used on the Ladder for Price Display. If Standard or Hybrid is selected it refers to the front three back and lay prices. If Complete is selected it refers to all of the prices, this requires a lot more information to be downloaded each call which is not suitable for slower internet connections and those on limited download allowances
Complete Prices in Hybrid mode - the amounts waiting to back and lay outside of the front three prices, i.e. full market depth, when Hybrid Price Display is selected on the Ladder. For people with slow internet connections and those on limited download allowances it should not be set low i.e. less than 1000ms
Traded Volume - the information relating to traded volumes
External Bets - How often to poll for bets made external to the application. The default is 10 seconds. This saves on bandwith & weighted calls if you only use this application for betting.
Account Funds - the information relating to your balance. If a change is made to a bet, i.e. a bet is submitted, altered or matched the balance will be updated automatically
|
Call Frequency
How often each of the calls is made can be changed using the drop down boxes and altering the time in milliseconds from 150ms to 20,000ms. This allows the speed at which calls are made to be tailored to the kind of market you are trading and your internet connection.
MPC
The MPC {Maximum Parallel Calls} works by limiting the number of calls that are sent to the Betfair API until a response is received.
Further customisation can be made by altering the MPC setting for each category using the drop down boxes; these can be set between 1 and 5.
For example, with the MPC set to 1 for Bets with a refresh rate of 250ms, a call will be made to the Betfair API once every 250ms to retrieve the information relating to your bets. If however, a response is not received within the 250ms no further calls will be sent until the initial response is received.
If the MPC was set to 3, a call will be made every 250ms for the Bets information. If however, a response is not received to the first call within 250ms a second call will be made. If no response is received to the second call within 250ms a third call will be made. If there was no response to the third call no further calls would be sent out until a response was received to one of the three calls upon which a further call would be made.
This helps to ensure much better running of the program and smoother information flow. The default settings for MPC should be suitable for most application usage. For slow broadband connections, {< 1MBs} an MPC of 1 is recommended for all calls.
Menu Options
By right clicking on the header of the window the following menu options are displayed:
Restore Default Settings - by clicking this the API Settings Manager will reset to the default settings
Max Weighted Calls Per Second - limits the number of data requests from Betfair per second. This can be set between 5 and 20
|
The default settings are:
This means that 11 calls are made each second when Hybrid Price Display is selected on the ladder:
Bets - 4 calls/sec (one call every 250ms)
Prices - 5 calls/sec (one call every 200ms)
Complete Prices in Hybrid mode - 1 call/sec (one call every 1000ms)
Traded Volume - 1 call/sec (one call every 1000ms)
|
Betfair Weighted Call Charging
Betfair impose an additional charge if you make more than 20 weighted calls per second to their API. The application restricts the number of calls per second to Betfair, however your Betfair 20 calls per second allowance is for all applications you are running & logged into, including the Betfair website. Go over this amount and you will be charged. Full details of these charges can be found in section 5 on the Betfair Charges Page
Running the application for a single market using the factory settings above uses a maximum of 11 calls per second. This is well below the 20 calls per second. {NB Account Funds calls do not count towards your call allowance.}
With the program it is possible to have more than one market loaded at once. However, the application will not exceed 20 calls per second. This is because the active market (the market displayed in the header of the Main Info Bar) will take precedence and the calls will be made for that market first. The remaining calls will be shared between any other markets you have open.
For example, with Max Weighted Calls Per Second set to 19 and using the default settings, there are 8 calls per second left over, the other markets loaded will share these remaining 8 calls.
If the Max Weighted Calls Per Second was set to 11 and the default factory settings were used there would be no left over calls per second and therefore the other markets loaded would not refresh. It is therefore important when trading on multiple markets that your settings for one market do not exceed your Max Weighted Calls Per Second.